package com.yjjxt

/**
 * 使用一次
 */
object Hello26Line {
  def main(args: Array[String]): Unit = {

    m1((x: String) => {
      println(x)
    })
    m1(x => {
      x * 2 + 1
    })

    m1(_ * 2 + 1)

    m1(_)

    m1(
      println(_)
    )

    m2((a, b) => {
      println(a + "--" + b)
    })

    m2(_ + _)
  }

  def m1(fun: (String => Unit)): Unit = {
    fun("abcd")
  }

  def m2(fun: ((Int, Int) => Unit)): Unit = {

  }

}
